﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AssetsSys.Model;

namespace AssetsSys.model
{
    /// <summary>
    /// 变更记录表
    /// </summary>
    public class Modify : BaseEntity
    {
        /// <summary>
        /// 变更资产
        /// </summary>
        [ForeignKey(nameof(Assets))]
        public Guid AssetsId { get; set; }
        public Assets Assets { get; set; }
        /// <summary>
        /// 原状况
        /// </summary>
        [ForeignKey(nameof(OldState))]
        public Guid OldStateId { get; set; }
        public Status OldState { get; set; }
        /// <summary>
        /// 现状况
        /// </summary>
        [ForeignKey(nameof(NewState))]
        public Guid NewStateId { get; set; }
        public Status NewState { get; set; }
        /// <summary>
        /// 变更状态(0等待，1同意，2拒绝)
        /// </summary>
        public string ModifyState { get; set; }
        /// <summary>
        /// 变更描述
        /// </summary>
        public string ModifyDescribe { get; set; }
        /// <summary>
        /// 接收人
        /// </summary>
        [ForeignKey(nameof(AcceptUsers))]
        public Guid AcceptId { get; set; }
        public User AcceptUsers { get; set; }
        /// <summary>
        /// 变更人
        /// </summary>
        [ForeignKey(nameof(ModifyUsers))]
        public Guid ModifyId { get; set; }
        public User ModifyUsers { get; set; }

    }
}
